﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../scripts/boot.js" type="text/javascript"></script>
    <script src="../scripts/kindeditor/kindeditor-min.js" type="text/javascript"></script>
    <script src="../scripts/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
    <link href="../scripts/kindeditor/themes/default/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    var editor;
    KindEditor.ready(function (K) {
        editor = K.create('textarea[name="nw_content"]', {
            allowFileManager: true
        });
        var uploadbutton = K.uploadbutton({
            button: K('#uploadButton')[0],
            fieldName: 'imgFile',
            url: '../scripts/kindeditor/upload/upload_json.ashx?dir=image',
            afterUpload: function (data) {
                if (data.error == 0) {
                    $("#img").attr("href", data.url);
                    $(".ke-button").val("重新上传");
                    mini.get("nw_img").setValue(data.url);
                    $("#spanload").show();
                } else
                    ShowMessage("系统提示", data.message, 2);
            },
            afterError: function (str) {
                ShowMessage("系统提示", "上传失败！", 3);
            }
        });
        uploadbutton.fileBox.change(function (e) {
            uploadbutton.submit();
        });
    });
</script>
</head>
<body>
<div id="editform" class="form">
    <input class="mini-hidden" name="nw_no" id="nw_no" />
    <table style="width: 98%; height: 100%;">
        <tr style="height: 20px">
            <td class="tdtitle" style="width: 80px;">
                标题：
            </td>
            <td class="tdtext">
                <input name="nw_title" class="mini-textbox" required="true" style="width:700px;"/>
            </td>
        </tr>
        <tr style="height: 20px">
            <td class="tdtitle">
                类别：
            </td>
            <td class="tdtext">
                <input name="nw_type" class="mini-combobox" repeatlayout="table" repeatdirection="vertical"
                    style="width:120px;" data="NewsCentre" required="true" />&nbsp;&nbsp;
                <input name="nw_hide" class="mini-checkbox" text="隐藏"/>&nbsp;
                <input name="nw_orderid" class="mini-checkbox" text="置顶"/>&nbsp;
                <input name="nw_red" class="mini-checkbox" text="描红"/>&nbsp;
                <input name="nw_new" class="mini-checkbox" text="最新"/>
            </td>
        </tr>
        <tr style="height: 20px">
            <td class="tdtitle">
                图片：
            </td>
            <td class="tdtext">
                <input class="mini-hidden" name="nw_img" id="nw_img" />
                <span id="spanload" style="display:none;">已经上传，<a id="img" class="linelink" target="_blank">查看</a>&nbsp;&nbsp;<a class="mini-button" iconcls="icon-remove" onclick="onDelete">删除</a></span>&nbsp;&nbsp;<input type="button" id="uploadButton" value="上传" />
            </td>
        </tr>
        <tr style="height: 20px">
            <td class="tdtitle">
                内容：
            </td>
            <td class="tdtext">
                <textarea name="nw_content" style="width:700px;height:300px;visibility:hidden;"></textarea>
            </td>
        </tr>
    </table>
</div>
<div property="footer" style="text-align:center;padding:5px;">
    <a id="btnSave" class="Update_Button mini-button" style="width:60px;">保存</a>
    <span style="display:inline-block;width:25px;"></span>
    <a id="btnClose" class="Cancel_Button mini-button" style="width:60px;">关闭</a>
</div>
</body>
</html>